<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目流转单管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出项目数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/zx/total/export");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
			
		});
		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/zx/total/list");
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zx/total/">项目列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="total"  action="${ctx}/zx/total/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		
		<ul class="ul-form">
			<li>
				<label>项目具体分类：</label>
				<sys:treeselect id="keyword" name="keyword.id" value="${total.keyword.id}" labelName="keyword.name" labelValue="${total.keyword.name}"
					title="项目具体分类" url="/zx/keyword/treeData" cssClass="required" />
			</li>
			<li>
				<label style="width: 100px">开标时间范围：</label>
				<input name="startBidOpenDate" id="startBidOpenDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${total.startBidOpenDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false, maxDate:'#F{$dp.$D(\'endBidOpenDate\')}'});"/>
					~
				<input name="endBidOpenDate" id="endBidOpenDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${total.endBidOpenDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false, minDate:'#F{$dp.$D(\'startBidOpenDate\')}'});"/>
			</li>
			
			<li class="clearfix"></li>
			<li>
				<label>项目分类：</label>
				<sys:treeselect id="cgml" name="cgml.id" value="${total.cgml.id}" labelName="cgml.name" labelValue="${total.cgml.name}"
					title="项目具体分类" url="/zx/cgml/treeData" cssClass="required" />
			</li>
			<li>
				<label  style="width: 100px">中标时间范围：</label>
				<input name="startTenderAwardDate" id="startTenderAwardDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${total.startTenderAwardDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false, maxDate:'#F{$dp.$D(\'endTenderAwardDate\')}'});"/>
					~
				<input name="endTenderAwardDate" id="endTenderAwardDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${total.endTenderAwardDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false, minDate:'#F{$dp.$D(\'startTenderAwardDate\')}'});"/>
			</li>
			
			<li class="clearfix"></li>
			<li>
				<label>招标方式：</label>
				<form:select path="tenderWay" cssStyle="width:177px">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('tender_way')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
				<label>标书程序：</label>
				<form:select path="tenderProcedure" cssStyle="width:177px">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('tender_procedure')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
				<label>项目名称：</label>
				<form:input path="proName" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			
			<li class="clearfix"></li>
			<%-- <li>
				<label>项目预算：</label>
				<form:input path="budgetMoney" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li> --%>
			<li>
				<label>项目供应商：</label>
				<form:input path="supplier" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			<li>
				<label>采购单位：</label>
				<form:input path="buyUnit" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			<%-- <li>
				<label>项目联系人：</label>
				<form:input path="contact" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li> --%>
			<li>
				<label>报价文件：</label>
				<form:input path="quotedPricFile" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			<li class="clearfix"></li>
			<li>
				<label>项目执行人：</label>
				<form:input path="proPerformer" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			<%-- <li>
				<label>招标文件：</label>
				<form:input path="tenderFile" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li> --%>
			<li>
				<label>投标文件：</label>
				<form:input path="bidFile" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			
			<li class="clearfix"></li>
			<li>
				<label>项目编码：</label>
				<form:input path="proNo" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li>
				<label>项目负责人：</label>
				<form:input path="proPic" htmlEscape="false" maxlength="255" class="input-medium number"/>
			</li>
			
			
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
				<shiro:hasPermission name="zx:total:edit">
					<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
				</shiro:hasPermission>
			</li>
			<li class="clearfix"></li>
			
		</ul>
	</form:form>
	
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>项目名称</th>
				<th>项目编号</th>
				<th>项目分类</th>
				<th>标书制作人</th>
				<th>项目执行人</th>
				<th>项目负责人</th>
				<th>招标方式</th>
				<th>预算金额(<font style="color: red">万元</font>)</th>
				<th>开始发售时间</th>
				<th>发售截止时间</th>
				<th>开标时间</th>
			
				<th>中标公告时间</th>
				<th>领取标书通知时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="total">
			<tr>
				<td title="${total.proName}"> 
					
					${fns:abbr(total.proName, 60)}
					<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${total.sectionName}</span>
					<c:choose>
						<c:when test="${total.isSubpackage eq '1'}">
							<c:if test="${total.sectionTrashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty total.resetSectionId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${total.sectionRestartCount}次</span>
							</c:if>
						</c:when>
						<c:otherwise>
							<c:if test="${total.trashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty total.resetLzdId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${total.restartCount}次</span>
							</c:if>
						</c:otherwise>
					</c:choose>	
				</td>
				<td>
					${total.proNo}
				</td>
				<td>
					${total.cgml.name}
				</td>
				<td>${total.makeTenderBy}</td>
				<td>
					${total.proPerformer}
				</td>
				<td>
					${total.proPic}
				</td>
				<td>
					${fns:getDictLabel(total.tenderWay, 'tender_way', '无')}
				</td>
				<td>
					<fmt:formatNumber value="${total.isSubpackage eq '1' ? total.sectionBudgetMoney : total.budgetMoney}" type="currency" pattern="￥.000000"/>
				</td>
				<td><fmt:formatDate value="${total.sellDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td><fmt:formatDate value="${total.tenderSaleDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td><fmt:formatDate value="${total.bidOpenDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				
				<td><fmt:formatDate value="${total.tenderAwardDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td><fmt:formatDate value="${total.getTenderDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td>
	    			<shiro:hasPermission name="zx:total:view">
	    				<a href="${ctx}/zx/all/lzd/getLzdAllInfo?lzdId=${total.id}&sectionId=${total.sectionId}&pageFlag=totalShow"> 查看详情</a>
	    			</shiro:hasPermission>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>